#include <iostream>
using namespace std;

typedef struct _tree_node {
	int value;
	struct _tree_node* left;
	struct _tree_node* right;

	_tree_node(int val) {
		value = val;
		left = NULL;
		right = NULL;
	}
}tree_node;

tree_node* get_btree() {
	tree_node* r0 = new tree_node(0);
	tree_node* r1 = new tree_node(1);
	tree_node* r2 = new tree_node(2);
	tree_node* r3 = new tree_node(3);
	tree_node* r4 = new tree_node(4);
	tree_node* r5 = new tree_node(5);

	r0->left = r1;
	r0->right = r2;
	r1->left = r3;
	r1->right = r4;
	r2->right = r5;

	return r0;
}

int max(int a, int b) {
	return (a>b?a:b);
}

int get_deep(tree_node* root) {
	if (root == NULL)
		return 0;

	int left = get_deep(root->left);
	int right = get_deep(root->right);

	return max(left, right)+1;
}

//int main(){
//	tree_node* root = get_btree();
//	int deep = get_deep(root);
//	return 0;
//}